package com.asa.mvvm_aop_frame.main

import android.app.Activity
import android.app.Application
import android.os.Bundle
import android.util.Log
import com.asa.mvvm_aop_frame.basic.AutoSize
import com.asa.mvvm_aop_frame.basic.BaseApp
import com.asa.mvvm_aop_frame.basic.BaseContract
import com.asa.mvvm_aop_frame.data.dataAllMode
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import org.koin.core.module.Module

/**
 * create By：anderson
 * on 2022/4/27
 * desc:
 */
class App:Application(),BaseContract.IApplication {



    @AutoSize(designWidthInDp = BaseApp.DESIGN_WIDTH_INDP, designHeightInDp = BaseApp.DESIGN_HEIGHT_INDP)
    override fun onCreate() {
        super.onCreate()
        startKoin {
           androidContext(this@App)
            modules(arrayListOf<Module>().also {
                it.addAll(dataAllMode)
                it.addAll(mainAllModel)

            })
        }
    }


    override fun crashOpera(ex: Throwable) {
        super.crashOpera(ex)

    }





}